<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="../../resources/js/Util.js"></script>
    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../resources/easyui/plugin/jquery.cookie.js"></script>
    <title>中奖信息</title>
    <script type="text/javascript">
        //判断是否带有参数
        var appId = '';
        var openId = '';
        if(document.URL.lastIndexOf("?") > 0) {
            var arr=document.URL.substring(document.URL.lastIndexOf("?")+1, document.URL.length).split("&");
            for(var i=0;i<arr.length; i++)
            {
                if(arr[i].split("=")[0] == 'appId') {
                    appId = arr[i].split("=")[1];
                } else if(arr[i].split("=")[0] == 'openId') {
                    openId = arr[i].split("=")[1];
                }
            }
        }

        $(document).ready(function () {
            if(appId == '' || openId == '') {
                document.body.innerHTML = '请关注内蒙古移动微信号，以指定方式参加活动。';
            }

            setMyPrizes();
        });

        function setMyPrizes() {
            var html='';
            var prizeList = $('#gundong1');
            restClient('/rest/game/prize/flop', function(data){
                html += "<ul>";
                for(var o in data) {
                    html += '<li><span><p>';

                    var tel = data[o].tel;
                    tel = tel.substring(0,3)+"****"+tel.substring(7,11);
                    var result = data[o].result;
                    html += tel + "</p><p style='margin-top: -12px;'>" + result + "</p></span>";

                    html += '<span>' + new Date(data[o].finishTime).format('yyyy年MM月dd日') + '</span></li>';
                }
                prizeList.html(html);

            }, {appId: appId, openId: openId})
        }
    </script>
</head>
<body>
<form id="form1" runat="server">
    <div class="page">
        <div class="ban1"><img src="images/zj.jpg" width="100%"/></div>
        <div class="list1">
            <div class="list2">
                <div class="zjbt"><span>奖品</span><span>时间</span></div>
                <div id="gundong1">
                </div>
            </div>
        </div>
        <img src="images/bgdi.jpg" width="100%"/><img src="images/dibu.jpg" width="100%"/>
    </div>
</form>
</body>
</html>